package com.example.androidlearning2200;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;

public class ChatActivity extends AppCompatActivity {
    TextView tvName,tvMsg;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_chat);
        String name = getIntent().getExtras().getString("name");
        String msg = getIntent().getExtras().getString("msg");
        Log.d("ChatActivity", name + msg);
        tvName = findViewById(R.id.tvName);
        tvMsg = findViewById(R.id.tvMsg);
        tvName.setText(name);
        tvMsg.setText(msg);
    }
}